package org.sdp.pearproject.service.impl;

import com.alibaba.fastjson.JSONObject;

import org.sdp.pearproject.dto.convert.*;
import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import org.sdp.pearproject.dto.response.*;
import org.sdp.pearproject.dao.mapper.*;
import org.sdp.pearproject.service.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName: ProjectServiceSuperImpl
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-08
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectServiceSuperImpl extends BaseServiceImpl implements ProjectService {
    @Autowired
    protected ProjectMapper projectMapper;

    public static Map<String, String> uniqueFieldMap = initUniqueFieldMap();

    public static Map initUniqueFieldMap() {
        HashMap map = new HashMap<>();
        map.put("code", "编号");
        return map;
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public Integer addProject(ProjectAddRequest request) throws Exception {
        ProjectWithBLOBs daoRequest = new ProjectAddRequestConvert().convert(request);
        fixEqualCondition(request, "project", "add", "", null);
        Integer result = 0;
        try {
            result = projectMapper.insertSelective(daoRequest);
        }catch(Exception ex) {
            ex.printStackTrace();
            throw checkDBDupException(ex, uniqueFieldMap);
        }
        if (result > 0) {
            result = daoRequest.getId();
        }
        addHistory(request, "A", "project", "api", result, null);
        return result;
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public Integer updateProject(ProjectUpdateRequest request) throws Exception {
        fixEqualCondition(request, "project", "update", request.getId()+"", null);
        checkInternalId(request, "project", "update", request.getId());
        addHistory(request, "U", "project", "api", request.getId(), null);

        ProjectWithBLOBs daoRequest = new ProjectUpdateRequestConvert().convert(request);
        ProjectExample example = new ProjectExample();
        example.createCriteria().andIdEqualTo(request.getId());
        if (request.getQueryOptions() != null && request.getQueryOptions().containsKey("setnull")) {
            example.setSetNull(JSONObject.toJavaObject(request.getQueryOptions().getJSONObject("setnull"), ProjectExample.CriteriaString.class));
        }
        Integer result = 0;
        try {
            result = projectMapper.updateByExampleSelective(daoRequest, example);
        }catch(Exception ex) {
            ex.printStackTrace();
            throw checkDBDupException(ex, uniqueFieldMap);
        }
        if (result > 0) {
            return result;
        }
        throw createUpdateFailException();
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public Integer deleteProject(ProjectDeleteRequest request) throws Exception {
        Date now = new Date();
        Integer count = 0;

        BaseRequest abstractRequest = new BaseRequest();
        copyProperties(request, abstractRequest);

        for(int index = 0; index < request.getIdList().size(); index++) {
            fixEqualCondition(request, "project", "delete", request.getIdList().get(index)+"", null);
            checkInternalId(request, "project", "delete", request.getIdList().get(index));
            addHistory(abstractRequest, "D", "project", "api", request.getIdList().get(index), null);
            projectMapper.deleteByPrimaryKey(request.getIdList().get(index));
            count++;
        }
        return count;
    }

    @Override
    public ProjectQueryResponse queryProject(ProjectQueryRequest request) throws Exception {
        ProjectWithBLOBs daoResponse = projectMapper.selectByPrimaryKeyWithBLOBs(request.getId());
        ProjectQueryResponse response = new ProjectQueryResponse();
        copyProperties(daoResponse, response);
        return response;
    }

    @Override
    public List<ProjectQueryResponse> listProject(ProjectQueryRequest request) throws Exception {
        ProjectWithBLOBs daoRequest = new ProjectWithBLOBs();
        copyProperties(request, daoRequest);
        ProjectExample example;
        try {
            example = ProjectExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }

        List<ProjectWithBLOBs> list;
        try {
            list = projectMapper.selectByExampleWithBLOBs(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }

        List<ProjectQueryResponse> responseList = new ArrayList<>();
        for(ProjectWithBLOBs item : list) {
            ProjectQueryResponse newItem = new ProjectQueryResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }

        return responseList;
    }

    @Override
    public Integer countProject(ProjectQueryRequest request) throws Exception {
        ProjectWithBLOBs daoRequest = new ProjectWithBLOBs();
        copyProperties(request, daoRequest);
        ProjectExample example;
        try {
            example = ProjectExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }

        Integer count;
        try {
            count = projectMapper.countByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }

        return count;
    }

    @Override
    public BaseStatResponse statProject(ProjectQueryRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectResponse> project(ProjectForProjectRequest request) throws Exception {
        ProjectForProject daoRequest = new ProjectForProject();
        copyProperties(request, daoRequest);
        
        List<ProjectForProject> list;
        
        ProjectForProjectExample example;
        try {
            example = ProjectForProjectExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectResponse> responseList = new ArrayList<>();
        for(ProjectForProject item : list) {
            ProjectForProjectResponse newItem = new ProjectForProjectResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProject(ProjectForProjectRequest request) throws Exception {
        ProjectForProject daoRequest = new ProjectForProject();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectExample example;
        try {
            example = ProjectForProjectExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProject(ProjectForProjectRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectMemberListForInviteResponse> projectMemberListForInvite(ProjectForProjectMemberListForInviteRequest request) throws Exception {
        ProjectForProjectMemberListForInvite daoRequest = new ProjectForProjectMemberListForInvite();
        copyProperties(request, daoRequest);
        
        List<ProjectForProjectMemberListForInvite> list;
        
        ProjectForProjectMemberListForInviteExample example;
        try {
            example = ProjectForProjectMemberListForInviteExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectMemberListForInviteByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectMemberListForInviteResponse> responseList = new ArrayList<>();
        for(ProjectForProjectMemberListForInvite item : list) {
            ProjectForProjectMemberListForInviteResponse newItem = new ProjectForProjectMemberListForInviteResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProjectMemberListForInvite(ProjectForProjectMemberListForInviteRequest request) throws Exception {
        ProjectForProjectMemberListForInvite daoRequest = new ProjectForProjectMemberListForInvite();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectMemberListForInviteExample example;
        try {
            example = ProjectForProjectMemberListForInviteExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectMemberListForInviteByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProjectMemberListForInvite(ProjectForProjectMemberListForInviteRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForDepartmentResponse> department(ProjectForDepartmentRequest request) throws Exception {
        ProjectForDepartment daoRequest = new ProjectForDepartment();
        copyProperties(request, daoRequest);
        
        List<ProjectForDepartment> list;
        
        ProjectForDepartmentExample example;
        try {
            example = ProjectForDepartmentExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.departmentByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForDepartmentResponse> responseList = new ArrayList<>();
        for(ProjectForDepartment item : list) {
            ProjectForDepartmentResponse newItem = new ProjectForDepartmentResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForDepartment(ProjectForDepartmentRequest request) throws Exception {
        ProjectForDepartment daoRequest = new ProjectForDepartment();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForDepartmentExample example;
        try {
            example = ProjectForDepartmentExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countDepartmentByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForDepartment(ProjectForDepartmentRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForTaskStagesResponse> taskStages(ProjectForTaskStagesRequest request) throws Exception {
        ProjectForTaskStages daoRequest = new ProjectForTaskStages();
        copyProperties(request, daoRequest);
        
        List<ProjectForTaskStages> list;
        
        ProjectForTaskStagesExample example;
        try {
            example = ProjectForTaskStagesExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.taskStagesByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForTaskStagesResponse> responseList = new ArrayList<>();
        for(ProjectForTaskStages item : list) {
            ProjectForTaskStagesResponse newItem = new ProjectForTaskStagesResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForTaskStages(ProjectForTaskStagesRequest request) throws Exception {
        ProjectForTaskStages daoRequest = new ProjectForTaskStages();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForTaskStagesExample example;
        try {
            example = ProjectForTaskStagesExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countTaskStagesByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForTaskStages(ProjectForTaskStagesRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForTaskStagesTasksResponse> taskStagesTasks(ProjectForTaskStagesTasksRequest request) throws Exception {
        ProjectForTaskStagesTasks daoRequest = new ProjectForTaskStagesTasks();
        copyProperties(request, daoRequest);
        
        List<ProjectForTaskStagesTasks> list;
        
        ProjectForTaskStagesTasksExample example;
        try {
            example = ProjectForTaskStagesTasksExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.taskStagesTasksByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForTaskStagesTasksResponse> responseList = new ArrayList<>();
        for(ProjectForTaskStagesTasks item : list) {
            ProjectForTaskStagesTasksResponse newItem = new ProjectForTaskStagesTasksResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForTaskStagesTasks(ProjectForTaskStagesTasksRequest request) throws Exception {
        ProjectForTaskStagesTasks daoRequest = new ProjectForTaskStagesTasks();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForTaskStagesTasksExample example;
        try {
            example = ProjectForTaskStagesTasksExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countTaskStagesTasksByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForTaskStagesTasks(ProjectForTaskStagesTasksRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForOrganizationGetOrgListResponse> organizationGetOrgList(ProjectForOrganizationGetOrgListRequest request) throws Exception {
        ProjectForOrganizationGetOrgList daoRequest = new ProjectForOrganizationGetOrgList();
        copyProperties(request, daoRequest);
        
        List<ProjectForOrganizationGetOrgList> list;
        
        ProjectForOrganizationGetOrgListExample example;
        try {
            example = ProjectForOrganizationGetOrgListExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.organizationGetOrgListByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForOrganizationGetOrgListResponse> responseList = new ArrayList<>();
        for(ProjectForOrganizationGetOrgList item : list) {
            ProjectForOrganizationGetOrgListResponse newItem = new ProjectForOrganizationGetOrgListResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForOrganizationGetOrgList(ProjectForOrganizationGetOrgListRequest request) throws Exception {
        ProjectForOrganizationGetOrgList daoRequest = new ProjectForOrganizationGetOrgList();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForOrganizationGetOrgListExample example;
        try {
            example = ProjectForOrganizationGetOrgListExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countOrganizationGetOrgListByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForOrganizationGetOrgList(ProjectForOrganizationGetOrgListRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForNotifyNoReadsBaseResponse> notifyNoReadsBase(ProjectForNotifyNoReadsBaseRequest request) throws Exception {
        ProjectForNotifyNoReadsBase daoRequest = new ProjectForNotifyNoReadsBase();
        copyProperties(request, daoRequest);
        
        List<ProjectForNotifyNoReadsBase> list;
        
        ProjectForNotifyNoReadsBaseExample example;
        try {
            example = ProjectForNotifyNoReadsBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.notifyNoReadsBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForNotifyNoReadsBaseResponse> responseList = new ArrayList<>();
        for(ProjectForNotifyNoReadsBase item : list) {
            ProjectForNotifyNoReadsBaseResponse newItem = new ProjectForNotifyNoReadsBaseResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForNotifyNoReadsBase(ProjectForNotifyNoReadsBaseRequest request) throws Exception {
        ProjectForNotifyNoReadsBase daoRequest = new ProjectForNotifyNoReadsBase();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForNotifyNoReadsBaseExample example;
        try {
            example = ProjectForNotifyNoReadsBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countNotifyNoReadsBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForNotifyNoReadsBase(ProjectForNotifyNoReadsBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForNotifyNoReadsCountResponse> notifyNoReadsCount(ProjectForNotifyNoReadsCountRequest request) throws Exception {
        ProjectForNotifyNoReadsCount daoRequest = new ProjectForNotifyNoReadsCount();
        copyProperties(request, daoRequest);
        
        List<ProjectForNotifyNoReadsCount> list;
        
        ProjectForNotifyNoReadsCountExample example;
        try {
            example = ProjectForNotifyNoReadsCountExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.notifyNoReadsCountByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForNotifyNoReadsCountResponse> responseList = new ArrayList<>();
        for(ProjectForNotifyNoReadsCount item : list) {
            ProjectForNotifyNoReadsCountResponse newItem = new ProjectForNotifyNoReadsCountResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForNotifyNoReadsCount(ProjectForNotifyNoReadsCountRequest request) throws Exception {
        ProjectForNotifyNoReadsCount daoRequest = new ProjectForNotifyNoReadsCount();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForNotifyNoReadsCountExample example;
        try {
            example = ProjectForNotifyNoReadsCountExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countNotifyNoReadsCountByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForNotifyNoReadsCount(ProjectForNotifyNoReadsCountRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectMemberIndexResponse> projectMemberIndex(ProjectForProjectMemberIndexRequest request) throws Exception {
        ProjectForProjectMemberIndex daoRequest = new ProjectForProjectMemberIndex();
        copyProperties(request, daoRequest);
        
        List<ProjectForProjectMemberIndex> list;
        
        ProjectForProjectMemberIndexExample example;
        try {
            example = ProjectForProjectMemberIndexExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectMemberIndexByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectMemberIndexResponse> responseList = new ArrayList<>();
        for(ProjectForProjectMemberIndex item : list) {
            ProjectForProjectMemberIndexResponse newItem = new ProjectForProjectMemberIndexResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProjectMemberIndex(ProjectForProjectMemberIndexRequest request) throws Exception {
        ProjectForProjectMemberIndex daoRequest = new ProjectForProjectMemberIndex();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectMemberIndexExample example;
        try {
            example = ProjectForProjectMemberIndexExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectMemberIndexByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProjectMemberIndex(ProjectForProjectMemberIndexRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForAccountBaseResponse> accountBase(ProjectForAccountBaseRequest request) throws Exception {
        ProjectForAccountBase daoRequest = new ProjectForAccountBase();
        copyProperties(request, daoRequest);
        
        List<ProjectForAccountBase> list;
        
        ProjectForAccountBaseExample example;
        try {
            example = ProjectForAccountBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.accountBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForAccountBaseResponse> responseList = new ArrayList<>();
        for(ProjectForAccountBase item : list) {
            ProjectForAccountBaseResponse newItem = new ProjectForAccountBaseResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForAccountBase(ProjectForAccountBaseRequest request) throws Exception {
        ProjectForAccountBase daoRequest = new ProjectForAccountBase();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForAccountBaseExample example;
        try {
            example = ProjectForAccountBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countAccountBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForAccountBase(ProjectForAccountBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForAccountAuthResponse> accountAuth(ProjectForAccountAuthRequest request) throws Exception {
        ProjectForAccountAuth daoRequest = new ProjectForAccountAuth();
        copyProperties(request, daoRequest);
        
        List<ProjectForAccountAuth> list;
        
        ProjectForAccountAuthExample example;
        try {
            example = ProjectForAccountAuthExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.accountAuthByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForAccountAuthResponse> responseList = new ArrayList<>();
        for(ProjectForAccountAuth item : list) {
            ProjectForAccountAuthResponse newItem = new ProjectForAccountAuthResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForAccountAuth(ProjectForAccountAuthRequest request) throws Exception {
        ProjectForAccountAuth daoRequest = new ProjectForAccountAuth();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForAccountAuthExample example;
        try {
            example = ProjectForAccountAuthExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countAccountAuthByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForAccountAuth(ProjectForAccountAuthRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectTemplateResponse> projectTemplate(ProjectForProjectTemplateRequest request) throws Exception {
        ProjectForProjectTemplate daoRequest = new ProjectForProjectTemplate();
        copyProperties(request, daoRequest);
        
        List<ProjectForProjectTemplate> list;
        
        ProjectForProjectTemplateExample example;
        try {
            example = ProjectForProjectTemplateExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectTemplateByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectTemplateResponse> responseList = new ArrayList<>();
        for(ProjectForProjectTemplate item : list) {
            ProjectForProjectTemplateResponse newItem = new ProjectForProjectTemplateResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProjectTemplate(ProjectForProjectTemplateRequest request) throws Exception {
        ProjectForProjectTemplate daoRequest = new ProjectForProjectTemplate();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectTemplateExample example;
        try {
            example = ProjectForProjectTemplateExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectTemplateByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProjectTemplate(ProjectForProjectTemplateRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForMenuMenuResponse> menuMenu(ProjectForMenuMenuRequest request) throws Exception {
        ProjectForMenuMenu daoRequest = new ProjectForMenuMenu();
        copyProperties(request, daoRequest);
        
        List<ProjectForMenuMenu> list;
        
        ProjectForMenuMenuExample example;
        try {
            example = ProjectForMenuMenuExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.menuMenuByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForMenuMenuResponse> responseList = new ArrayList<>();
        for(ProjectForMenuMenu item : list) {
            ProjectForMenuMenuResponse newItem = new ProjectForMenuMenuResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForMenuMenu(ProjectForMenuMenuRequest request) throws Exception {
        ProjectForMenuMenu daoRequest = new ProjectForMenuMenu();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForMenuMenuExample example;
        try {
            example = ProjectForMenuMenuExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countMenuMenuByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForMenuMenu(ProjectForMenuMenuRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForNodeBaseResponse> nodeBase(ProjectForNodeBaseRequest request) throws Exception {
        ProjectForNodeBase daoRequest = new ProjectForNodeBase();
        copyProperties(request, daoRequest);
        
        List<ProjectForNodeBase> list;
        
        ProjectForNodeBaseExample example;
        try {
            example = ProjectForNodeBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.nodeBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForNodeBaseResponse> responseList = new ArrayList<>();
        for(ProjectForNodeBase item : list) {
            ProjectForNodeBaseResponse newItem = new ProjectForNodeBaseResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForNodeBase(ProjectForNodeBaseRequest request) throws Exception {
        ProjectForNodeBase daoRequest = new ProjectForNodeBase();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForNodeBaseExample example;
        try {
            example = ProjectForNodeBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countNodeBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForNodeBase(ProjectForNodeBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForNotifyResponse> notify(ProjectForNotifyRequest request) throws Exception {
        ProjectForNotify daoRequest = new ProjectForNotify();
        copyProperties(request, daoRequest);
        
        List<ProjectForNotify> list;
        
        ProjectForNotifyExample example;
        try {
            example = ProjectForNotifyExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.notifyByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForNotifyResponse> responseList = new ArrayList<>();
        for(ProjectForNotify item : list) {
            ProjectForNotifyResponse newItem = new ProjectForNotifyResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForNotify(ProjectForNotifyRequest request) throws Exception {
        ProjectForNotify daoRequest = new ProjectForNotify();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForNotifyExample example;
        try {
            example = ProjectForNotifyExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countNotifyByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForNotify(ProjectForNotifyRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForIndexSystemConfigBaseResponse> indexSystemConfigBase(ProjectForIndexSystemConfigBaseRequest request) throws Exception {
        ProjectForIndexSystemConfigBase daoRequest = new ProjectForIndexSystemConfigBase();
        copyProperties(request, daoRequest);
        
        List<ProjectForIndexSystemConfigBase> list;
        
        ProjectForIndexSystemConfigBaseExample example;
        try {
            example = ProjectForIndexSystemConfigBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.indexSystemConfigBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForIndexSystemConfigBaseResponse> responseList = new ArrayList<>();
        for(ProjectForIndexSystemConfigBase item : list) {
            ProjectForIndexSystemConfigBaseResponse newItem = new ProjectForIndexSystemConfigBaseResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForIndexSystemConfigBase(ProjectForIndexSystemConfigBaseRequest request) throws Exception {
        ProjectForIndexSystemConfigBase daoRequest = new ProjectForIndexSystemConfigBase();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForIndexSystemConfigBaseExample example;
        try {
            example = ProjectForIndexSystemConfigBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countIndexSystemConfigBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForIndexSystemConfigBase(ProjectForIndexSystemConfigBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForNodeAuthBaseResponse> nodeAuthBase(ProjectForNodeAuthBaseRequest request) throws Exception {
        ProjectForNodeAuthBase daoRequest = new ProjectForNodeAuthBase();
        copyProperties(request, daoRequest);
        
        List<ProjectForNodeAuthBase> list;
        
        ProjectForNodeAuthBaseExample example;
        try {
            example = ProjectForNodeAuthBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.nodeAuthBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForNodeAuthBaseResponse> responseList = new ArrayList<>();
        for(ProjectForNodeAuthBase item : list) {
            ProjectForNodeAuthBaseResponse newItem = new ProjectForNodeAuthBaseResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForNodeAuthBase(ProjectForNodeAuthBaseRequest request) throws Exception {
        ProjectForNodeAuthBase daoRequest = new ProjectForNodeAuthBase();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForNodeAuthBaseExample example;
        try {
            example = ProjectForNodeAuthBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countNodeAuthBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForNodeAuthBase(ProjectForNodeAuthBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForMemberBaseResponse> memberBase(ProjectForMemberBaseRequest request) throws Exception {
        ProjectForMemberBase daoRequest = new ProjectForMemberBase();
        copyProperties(request, daoRequest);
        
        List<ProjectForMemberBase> list;
        
        ProjectForMemberBaseExample example;
        try {
            example = ProjectForMemberBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.memberBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForMemberBaseResponse> responseList = new ArrayList<>();
        for(ProjectForMemberBase item : list) {
            ProjectForMemberBaseResponse newItem = new ProjectForMemberBaseResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForMemberBase(ProjectForMemberBaseRequest request) throws Exception {
        ProjectForMemberBase daoRequest = new ProjectForMemberBase();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForMemberBaseExample example;
        try {
            example = ProjectForMemberBaseExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countMemberBaseByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForMemberBase(ProjectForMemberBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForFileResponse> file(ProjectForFileRequest request) throws Exception {
        ProjectForFile daoRequest = new ProjectForFile();
        copyProperties(request, daoRequest);
        
        List<ProjectForFile> list;
        
        ProjectForFileExample example;
        try {
            example = ProjectForFileExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.fileByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForFileResponse> responseList = new ArrayList<>();
        for(ProjectForFile item : list) {
            ProjectForFileResponse newItem = new ProjectForFileResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForFile(ProjectForFileRequest request) throws Exception {
        ProjectForFile daoRequest = new ProjectForFile();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForFileExample example;
        try {
            example = ProjectForFileExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countFileByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForFile(ProjectForFileRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectFeaturesResponse> projectFeatures(ProjectForProjectFeaturesRequest request) throws Exception {
        ProjectForProjectFeatures daoRequest = new ProjectForProjectFeatures();
        copyProperties(request, daoRequest);
        
        List<ProjectForProjectFeatures> list;
        
        ProjectForProjectFeaturesExample example;
        try {
            example = ProjectForProjectFeaturesExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectFeaturesByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectFeaturesResponse> responseList = new ArrayList<>();
        for(ProjectForProjectFeatures item : list) {
            ProjectForProjectFeaturesResponse newItem = new ProjectForProjectFeaturesResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProjectFeatures(ProjectForProjectFeaturesRequest request) throws Exception {
        ProjectForProjectFeatures daoRequest = new ProjectForProjectFeatures();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectFeaturesExample example;
        try {
            example = ProjectForProjectFeaturesExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectFeaturesByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProjectFeatures(ProjectForProjectFeaturesRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectVersionResponse> projectVersion(ProjectForProjectVersionRequest request) throws Exception {
        ProjectForProjectVersion daoRequest = new ProjectForProjectVersion();
        copyProperties(request, daoRequest);
        
        List<ProjectForProjectVersion> list;
        
        ProjectForProjectVersionExample example;
        try {
            example = ProjectForProjectVersionExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectVersionByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectVersionResponse> responseList = new ArrayList<>();
        for(ProjectForProjectVersion item : list) {
            ProjectForProjectVersionResponse newItem = new ProjectForProjectVersionResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProjectVersion(ProjectForProjectVersionRequest request) throws Exception {
        ProjectForProjectVersion daoRequest = new ProjectForProjectVersion();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectVersionExample example;
        try {
            example = ProjectForProjectVersionExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectVersionByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProjectVersion(ProjectForProjectVersionRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForTaskSelfListResponse> taskSelfList(ProjectForTaskSelfListRequest request) throws Exception {
        ProjectForTaskSelfList daoRequest = new ProjectForTaskSelfList();
        copyProperties(request, daoRequest);
        
        List<ProjectForTaskSelfList> list;
        
        ProjectForTaskSelfListExample example;
        try {
            example = ProjectForTaskSelfListExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.taskSelfListByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForTaskSelfListResponse> responseList = new ArrayList<>();
        for(ProjectForTaskSelfList item : list) {
            ProjectForTaskSelfListResponse newItem = new ProjectForTaskSelfListResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForTaskSelfList(ProjectForTaskSelfListRequest request) throws Exception {
        ProjectForTaskSelfList daoRequest = new ProjectForTaskSelfList();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForTaskSelfListExample example;
        try {
            example = ProjectForTaskSelfListExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countTaskSelfListByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForTaskSelfList(ProjectForTaskSelfListRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectGetLogBySelfProjectResponse> projectGetLogBySelfProject(ProjectForProjectGetLogBySelfProjectRequest request) throws Exception {
        ProjectForProjectGetLogBySelfProject daoRequest = new ProjectForProjectGetLogBySelfProject();
        copyProperties(request, daoRequest);
        
        List<ProjectForProjectGetLogBySelfProject> list;
        
        ProjectForProjectGetLogBySelfProjectExample example;
        try {
            example = ProjectForProjectGetLogBySelfProjectExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.projectGetLogBySelfProjectByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForProjectGetLogBySelfProjectResponse> responseList = new ArrayList<>();
        for(ProjectForProjectGetLogBySelfProject item : list) {
            ProjectForProjectGetLogBySelfProjectResponse newItem = new ProjectForProjectGetLogBySelfProjectResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForProjectGetLogBySelfProject(ProjectForProjectGetLogBySelfProjectRequest request) throws Exception {
        ProjectForProjectGetLogBySelfProject daoRequest = new ProjectForProjectGetLogBySelfProject();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForProjectGetLogBySelfProjectExample example;
        try {
            example = ProjectForProjectGetLogBySelfProjectExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countProjectGetLogBySelfProjectByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForProjectGetLogBySelfProject(ProjectForProjectGetLogBySelfProjectRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForTaskLogResponse> taskLog(ProjectForTaskLogRequest request) throws Exception {
        ProjectForTaskLog daoRequest = new ProjectForTaskLog();
        copyProperties(request, daoRequest);
        
        List<ProjectForTaskLog> list;
        
        ProjectForTaskLogExample example;
        try {
            example = ProjectForTaskLogExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.taskLogByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForTaskLogResponse> responseList = new ArrayList<>();
        for(ProjectForTaskLog item : list) {
            ProjectForTaskLogResponse newItem = new ProjectForTaskLogResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForTaskLog(ProjectForTaskLogRequest request) throws Exception {
        ProjectForTaskLog daoRequest = new ProjectForTaskLog();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForTaskLogExample example;
        try {
            example = ProjectForTaskLogExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countTaskLogByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForTaskLog(ProjectForTaskLogRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForTaskMemberResponse> taskMember(ProjectForTaskMemberRequest request) throws Exception {
        ProjectForTaskMember daoRequest = new ProjectForTaskMember();
        copyProperties(request, daoRequest);
        
        List<ProjectForTaskMember> list;
        
        ProjectForTaskMemberExample example;
        try {
            example = ProjectForTaskMemberExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            list = projectMapper.taskMemberByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        List<ProjectForTaskMemberResponse> responseList = new ArrayList<>();
        for(ProjectForTaskMember item : list) {
            ProjectForTaskMemberResponse newItem = new ProjectForTaskMemberResponse();
            copyProperties(item, newItem);
            responseList.add(newItem);
        }
        
        return responseList;
    }

    @Override
    public Integer countForTaskMember(ProjectForTaskMemberRequest request) throws Exception {
        ProjectForTaskMember daoRequest = new ProjectForTaskMember();
        copyProperties(request, daoRequest);
        
        Integer count;
        
        ProjectForTaskMemberExample example;
        try {
            example = ProjectForTaskMemberExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            count = projectMapper.countTaskMemberByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        return count;
    }
    
    @Override
    public BaseStatResponse statForTaskMember(ProjectForTaskMemberRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public JSONObject login(ProjectForLoginRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public JSONObject eventsGetEventsListByCalendar(ProjectForEventsGetEventsListByCalendarRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<Object> accountForbid(ProjectForAccountForbidRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<Object> accountResume(ProjectForAccountResumeRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public ProjectForIdToNameResponse idToName(ProjectForIdToNameRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public ProjectForNameToIdResponse nameToId(ProjectForNameToIdRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public ProjectForTaskCreateCommentParamResponse taskCreateCommentParam(ProjectForTaskCreateCommentParamRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public ProjectForReadResponse read(ProjectForReadRequest request) throws Exception {
        ProjectForRead daoRequest = new ProjectForRead();
        copyProperties(request, daoRequest);
        
        ProjectForRead record;
        
        ProjectForReadExample example;
        try {
            example = ProjectForReadExample.createExample(daoRequest, request.getQueryOptions());
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createFailException(ex);
        }
        
        try {
            record = projectMapper.readByExample(example);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw createDatabaseFailException(ex);
        }
        
        ProjectForReadResponse result = new ProjectForReadResponse();
        copyProperties(record, result);
        return result;
    }

    @Override
    public List<Object> projectCollectCollect(ProjectCollectionAddRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<Object> projectMemberInviteMember(ProjectMemberAddRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public InviteLinkQueryResponse inviteLinkSave(InviteLinkAddRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectMemberListForInviteResponse> projectMemberSearchInviteMember(ProjectForProjectMemberListForInviteRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForProjectResponse> selfList(ProjectForProjectRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public JSONObject notifyNoReads(ProjectForNotifyNoReadsBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public JSONObject account(ProjectForAccountBaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public JSONObject node(BaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForMenuMenuResponse> index(ProjectForMenuMenuRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public JSONObject indexSystemConfig(BaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<ProjectForAccountBaseResponse> accountAllList(BaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<Object> eventsSave(EventsAddRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public List<Object> loginOut(BaseRequest request) throws Exception {
        throw createFailException("not implement");
    }

    @Override
    public Boolean taskCreateComment(ProjectForTaskCreateCommentParamRequest request) throws Exception {
        throw createFailException("not implement");
    }

}
